﻿-- =============================================
-- Author:		Andreas Könighofer (IT-eXperience)
-- Create date: 14.01.2009
-- Description:	Updates existing Customer.
-- =============================================
CREATE PROCEDURE [dbo].[UpdateCustomer]
	-- Add the parameters for the stored procedure here
	@CustomerID INT
	, @CustomerName NVARCHAR(100) = NULL
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    UPDATE [BigDays2009].[dbo].[Customer]
	SET [CustomerName] = ISNULL(@CustomerName, CustomerName)
	WHERE CustomerID = @CustomerID
END

---- end script UpdateCustomer stored procedure ----

---- start script UpdateLocation stored procedure ----

